<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>后台</title>
    <link rel="stylesheet" href="/Public/Admin/css/dashicons.css">
    <link rel="stylesheet" href="/Public/Admin/css/style.css">
</head>
<body>
<div class="wrap wrap-article">
    <h1>商品管理</h1>
    <div class="s-nav">
        <div><form method="post">
            <input type="text" name="goods" value="" placeholder="输入关键字"><input type="submit" value="搜索商品">
        </form></div>
    </div>
    <div class="tips"></div>
    <div class="box">
        <div class="box-body">
            <table>
                <tr><th width="80">状态</th><th>商品名称</th><th width="120">所属分类</th><th width="100">库存</th><th width="150">上架时间</th><th width="100">操作</th></tr>
               <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vol): $mod = ($i % 2 );++$i;?><tr>
                    <td class="s-show">

                        <?php if($vol["is_show"] == 1): ?><i class="icon-yes">已上架</i><?php else: ?>
                            <i class="icon-wait">未上架</i><?php endif; ?>
                    </td>
                    <td class="s-title">
                        <a href="#"><?php echo ($vol["gname"]); ?></a>
                    </td>
                    <td>
                        <a href="#"><?php if($vol["cate"] == null): ?>[无分类]<?php else: ?>[<?php echo ($vol["cate"]); ?>]<?php endif; ?></a>
                    </td>
                    <td>
                       <?php echo ($vol["gnum"]); ?>
                    </td>
                    <td>
                        <?php echo (date('Y-m-d H:i:s',$vol["gtime"])); ?>
                    </td>
                    <td class="s-act">
                        <a href="/index.php/Admin/Goods/editGoods/id/<?php echo ($vol["id"]); ?>">编辑</a>
                        <a href="/index.php/Admin/Goods/delGoods/id/<?php echo ($vol["id"]); ?>" onclick="if(confirm('您确定要删除了吗？')===false) return false;">删除</a>
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </table>

        </div>
    </div>
    <div class="pagelist">
        <?php echo ($page); ?>
    </div>
</div>

</body>
</html>